The present invention relates to a method and an apparatus for coding/decoding using repeating recurrence steps. In each of these recurrence steps, an interval in which a value to be coded is located is divided into two new intervals, and a bit indicates in which of the new intervals formed in this manner the value is located. The method is continued until the value to be coded/decoded is located.
It is an object of the present invention to provide an improved method and apparatus of the above-described kind for coding/decoding in which the number of code bits is kept low.
In the method for coding/decoding a target range from a value range according to the invention, a recurrence step is repeated in a coding/decoding step for the target range until code bits are found for the target range to be coded, or the target range to be decoded is found using the code bits; in the recurrence step, an interval of the value range in which the target range to be coded/decoded is located is divided into two new intervals, a single bit indicates in which of the new intervals the target range to be coded/decoded is located, and the new interval indicated by the single bit is used as the interval for the next recurrence step, whereby the code bits for the target range to be coded or the target range to be decoded is found when the interval falls below a minimum quantity, wherein, in at least one recurrence step, a probability distribution for the target range in the interval is used to select the new intervals.
In the apparatus according to the invention means for performing the individual steps of the method according to the invention are provided.
The method according to the invention and the apparatus according to the invention as described above have the advantage that the number of code bits is kept low.
Preferred embodiments of the invention have additional advantages. The embodiments of the method according to the invention used to code/decode a multitude of data that have a certain sequence are particularly advantageous. When the interval limit is selected correctly, considerable savings can be achieved in terms of the number of code bits required. As a particularly simple model, probability distributions are used that depend on the number of subsequent elements in the sequence. The use of measured probability distributions has proven effective in certain applications. This applies for audio data in particular. Measured probability distributions can be stored particularly easily when they are converted to interval tables.